<?php $this->action("index","more","header");?>
	<div id="content">
		<div class="main">
	   		<h1>&nbsp;</h1>
			<div class="mod" id="sp-setting">
			    <div class="hd">
						<ul class="type-nav" style="text-align: left;">
					     <li  class="on"><a href="<?php echo $this->getUrl("index","admin","info",array("siteid"=>$site_E->id));?>">资料</a></li>
					    <li><a href="<?php echo $this->getUrl("index","admin","icon",array("siteid"=>$site_E->id));?>">图标</a></li>
					    <li><a href="<?php echo $this->getUrl("index","admin","room",array("siteid"=>$site_E->id));?>">房间</a></li>
					    <li><a href="<?php echo $this->getUrl("index","admin","design",array("siteid"=>$site_E->id));?>">设计</a></li>
					</ul>
				</div>
	  				 <div class="bd">
	      				 <form method="post" id="sp-setting-form">
			            <div class="item">
			                <label>小站名称:</label>
			                <input type="text" class="sp-input" name="title" value="<?php echo $site_E->title;?>">
			            </div>
			
			
			            <div class="item">
			                <label>小站描述:</label>
			                <textarea class="sp-desc" name="descript"><?php echo $site_E->descript;?></textarea>
			            </div>
						<br/>
	          			<div class="attn hide" id="error_msg"></div>
			            <div class="item-submit">
			                <span class="bn-flat-hot">
			                <input type="hidden" value="1" name="update">
			                <input type="submit" value="保存" hidefocus="1" name="pf_submit"></span>
						</div>
	       			</form>
				</div>
			</div>
	
	<script>
	    Do('dialog', function () {
	        var site_id = $('body').attr('id');
	        var css_top_tips = '#top-tips',
	            tmpl_top_tips = '<div id="top-tips">你的最新设置已经被成功保存.</div>',
	            postUrl = '/admin_info/'+site_id,
	            removeTips = function () {
	            $(css_top_tips).slideUp(function () {
	                $(this).remove();
	            })
	        };
	        $('#sp-setting-form').submit(function (e) {
	            hide_error();
	            checks = $(this).data('checks');
	            if (typeof checks === 'object' && checks.length) {
	                var all_ok = true;
	                for (var i=0; i<checks.length; i++) {
	                    all_ok = all_ok && checks[i](this);
	                }
	                if (!all_ok) {
	                    return false;
	                }
	            }
	            e.preventDefault();
	            $.post(
	                postUrl, 
	                $(this).serialize(),
	                function (ret) {
	                    if (ret.r==0){
	                        if (!$(css_top_tips).length) {
	                            $('body').append(tmpl_top_tips);
	                            $(css_top_tips).slideDown();
	                            setTimeout(removeTips, 5000); 
	                        }
	                    } else {
	                        show_error(ret.error);
	                    }
	                }
	            , 'json');
	        });
	
	        hide_error = function () {
	            $("#error_msg").text('');
	            $("#error_msg").addClass('hide');
	        }
	        show_error = function (error){
	            $("#error_msg").text(error);
	            $("#error_msg").removeClass('hide');
	        }
	    });
	</script>
		</div>
		<div class="aside">
			<div class="mod sp-tips">
			   
			</div>
	       </div>
		<div class="extra">
		</div>
	</div><!-- content end -->
 <?php $this->partial("/Tpl/Index/MoreAction/doFooter.htm");?>     
</body>
</html>